package com.sysphysic.aiotsystem.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SimpleMqttConfig {

    @Value("${mqtt.broker-url:tcp://192.168.31.238:1883}")
    private String brokerUrl;

    @Value("${mqtt.client-id:spring-mqtt-server}")
    private String clientId;

    @Value("${mqtt.username:zterch}")
    private String username;

    @Value("${mqtt.password:zterch}")
    private String password;

    @Value("${mqtt.topic.control:/device/led/control}")
    private String controlTopic;

    // Getters for other classes to use
    public String getBrokerUrl() {
        return brokerUrl;
    }

    public String getClientId() {
        return clientId;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public String getControlTopic() {
        return controlTopic;
    }
}